package com.heima.behavior.controller.v1;

import com.heima.behavior.service.ApLikesBehaviorService;
import com.heima.model.behavior.LikeOrUnLikeBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 晓风残月Lx
 * @date 2023/8/13 21:58
 */
@RestController
@RequestMapping("/api/v1")
public class ApLikesBehaviorController {

    @Autowired
    private ApLikesBehaviorService apLikesBehaviorService;

    @PostMapping("/likes_behavior")
    public ResponseResult like(@RequestBody LikeOrUnLikeBehaviorDto dto) {
        return apLikesBehaviorService.like(dto);
    }
}
